//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopAddressInfo, MinishopAddressInfoResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopAddressInfoList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopAddressInfoResponse>(`/uctoo/minishop_address_info/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopAddressInfo = async (id: string) => {
  return requestClient.get<MinishopAddressInfo>(`/uctoo/minishop_address_info/${id}`);
};

export const adductooMinishopAddressInfo = async (data: Partial<MinishopAddressInfo>) => {
  return requestClient.post<MinishopAddressInfo>('/uctoo/minishop_address_info/add', data);
};

export const edituctooMinishopAddressInfo = async (data: Partial<MinishopAddressInfo>) => {
  return requestClient.post<MinishopAddressInfo>('/uctoo/minishop_address_info/edit', data);
};

export const deleteuctooMinishopAddressInfo = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_address_info/del', { id });
};
